﻿using Daq.Models;
using Daq.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Telerik.Windows.Controls;

namespace Daq.Views
{
    /// <summary>
    /// AlertSettingsView.xaml 的交互逻辑
    /// </summary>
    public partial class AlertSettingsView : RadWindow
    {
        private IEnumerable<DaqChannelInfo> channels;
        public AlertSettingsView(IEnumerable<DaqChannelInfo> channels)
        {
            this.channels = channels;
            InitializeComponent();
            comboBoxChannelList.ItemsSource = channels.Select(ch=>ch.Alias).ToArray();
        }

        private void btnClose_Click(object sender, RoutedEventArgs e)
        {
            Close();
        }

        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
            Close();
        }
    }
}
